package main
import "fmt"
// commen.js require + module.exports
// es6 import + export default
// type? JS 弱类型动态语言
// type 自定义类型 不需要class关键字
type Books struct{
	title string
	author string
	subject string
	book_id int
}

func main(){
	// fmt.Println(Books{"GO语言","google","现在C",123})
	// fmt.Println(Books{title:"GO语言",
	// author:"google",
	// subject:"现代C",
	// book_id:01354})
	// fmt.Println(Books{title:"GO语言",
	// author:"google"})
	var Book1 Books
	var Book2 Books

	Book1.title = "GO语言"
	Book1.author = "Google"
	Book1.subject = "现代C"
	Book1.book_id = 21354

	Book2.title = "Python"
	Book2.author = "龟叔"
	Book2.subject = "AI语言"
	Book2.book_id = 33333

	fmt.Printf("Book2 title: %s\n", Book2.title)
	fmt.Printf("Book2 author: %s\n", Book2.author)
	fmt.Printf("Book2 subject: %s\n", Book2.subject)
	fmt.Printf("Book2 book_id: %d\n", Book2.book_id)
	
}